Imports Castle.ActiveRecord


''' <summary>
'''	Gerado por MyGeneration usando o template ActiveRecord Object Mapper-1.0.3
'''	Criado em 14/08/2010 00:29:39
''' </summary>
''' <remarks></remarks>

<Serializable(), ActiveRecord("mercado", DynamicUpdate:= true)> _
Public Class Mercado
	Inherits ActiveRecordBase(Of Mercado)
	
	Private _cd_mercado As Integer
	Private _mercado_descricao As String


    Private _Paiss As IList(Of Model.Pais)

	<PrimaryKey(PrimaryKeyType.Sequence, SequenceName:="mercado_cd_mercado_seq")> _
	Public Property cd_mercado() As Integer
		Get
			Return _cd_mercado
		End Get
		Set(ByVal value As Integer)
			_cd_mercado = value
		End Set
	End Property

	<[Property]("mercado_descricao")> _
	Public Property mercado_descricao() As String
		Get
			Return _mercado_descricao
		End Get
		Set(ByVal value As String)
			_mercado_descricao = value
		End Set
	End Property

    '<OneToOne()> _
    'Public Property Pais() As Model.Pais
    '    Get
    '        Return _Paiss
    '    End Get
    '    Set(ByVal value As Model.Pais)
    '        _Paiss = value
    '    End Set
    'End Property
    <HasMany(GetType(Model.Pais), Table:="pais", ColumnKey:="cd_mercado", Inverse:=True, Lazy:=True)> _
    Public Property Pais() As IList(Of Model.Pais)
        Get
            Return _Paiss
        End Get
        Set(ByVal value As IList(Of Model.Pais))
            _Paiss = value
        End Set
    End Property

End Class
